<!--审核会员页面-->
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title" id="myModalLabel">审核会员</h4>
</div>
<div class="modal-body">
    <form class="form-horizontal">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
                <input type="email"  readonly class="form-control" id="inputEmail3" value="{$memberInfo['realname']}" placeholder="">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">手机号码</label>
            <div class="col-sm-10">
                <input type="text" readonly class="form-control" value="{$memberInfo['mobile']}"  id="inputPassword3" placeholder="">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">公司信息</label>
            <div class="col-sm-10">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">{$memberInfo['company']}</h3>
                    </div>
                    <div class="panel-body">

                        {loop $companyAttrs $companyAttr}
                             <span class="label label-danger">{$companyAttr['value']}</span>
                        {/loop}

                    </div>
                </div>

            </div>
        </div>



    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    <button type="button" onclick="upgradeMemberLevel({$memberInfo['uid']})" class="btn btn-primary">通过审核</button>
</div>

<script>
    //通过审核
    function upgradeMemberLevel(uid) {
        var _uid = uid;
        $.post("{php echo url('mc/member/audit-member', $params = array('uid'=>$li['uid'],'op'=>'upgratemember'))}",
            {'uid' : _uid,'groupid':3},
            function(data) {
                console.log(data);
                var data = JSON.parse(data);
                if(data.errCode == 0){
                    util.message(data.msg, 'refresh', 'success');
                }else{
                    util.message(data.msg, '', 'error');
                }
            });
    }

</script>